﻿@using VirtualPress.Infrastructure.Entities.Enum;
@using VirtualPress.Infrastructure.Entities.Entity;
@using VirtualPress.Tool.Framework;
@{
    ViewBag.Title = "运营期刊";
    Layout = "/Areas/WorkSpace/Views/Shared/_WorkSpace.cshtml";
}
@section head{
    <link rel="stylesheet" href="/content/css/uniform.css" />
}
<div id="content-header">
    <h1>
        运营期刊</h1>
</div>
<div id="breadcrumb">
    <a href="/WorkSpace/press/index" class="tip-bottom"><i class="icon-home"></i>起始页</a> <a href="/WorkSpace/Press">
        期刊管理</a> <a href="javascript:" class="current">运营期刊</a>
</div>

<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-title">
                    <h5>
                        运营期刊</h5>
                    <div class="buttons" style="margin-right: 15px;">
                        <a href="/WorkSpace/Press/PushOne" class="btn btn-success btn-mini"><i class="icon-plus icon-white">
                        </i>新增期刊</a>
                    </div>
                </div>
                <div class="widget-content nopadding">
                    <table class="table table-bordered">
                        <thead>
                            <tr style="cursor: pointer;">
                                <th style="width: 20%">
                                    期刊名称
                                </th>
                                <th style="width: 10%">
                                    行业分类
                                </th>
                                <th style="width: 30%">
                                    期刊简介
                                </th>
                                <th style="width: 12%">
                                    期刊分类
                                </th>
                                <th style="width: 13%">
                                    主办单位
                                </th>
                                <th style="width: 15%">
                                    操作
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            @{ItemListBox<Periodical> data = ViewBag.Journals;
                              List<Periodical> list = data.Data;}
                            @foreach (var item in list)
                            { 
                                <tr>
                                    <td>
                                        <a target="_blank" href="/manuscripts/index/@item.Id">@item.Name</a>
                                    </td>
                                    <td style="text-align: center">
                                        @item.IndType.Mapping()
                                    </td>
                                    <td>
                                        @item.Introduction.NoHTMLLabel()
                                    </td>
                                    <td style="text-align:center;">
                                        @item.Type.Mapping()
                                    </td>
                                    <td style="text-align: center">
                                        @item.ZBDW
                                    </td>
                                    <td style="text-align: center">
                                        <a href="/WorkSpace/Press/Edit/@item.Id" class="btn btn-primary btn-mini">编辑</a>
                                        @*<a href="/workspace/console/index?journal=@item.Id" class="btn btn-warning btn-mini">进入</a>*@
                                        @if (item.IsActive)
                                        {
                                            <a href="/WorkSpace/Press/DisableJournal/@item.Id" class="btn btn-danger btn-mini">停用</a>
                                        }
                                        else
                                        {
                                            <a href="/WorkSpace/Press/EnableJournal/@item.Id" class="btn btn-success btn-mini">启用</a>
                                        }
                                    </td>
                                </tr>
                            }
                        </tbody>
                    </table>
                </div>
                @Html.Raw(data.PageItemSegment)
            </div>
        </div>
    </div>
</div>
@section tail{
    <script type="text/javascript" src="/scripts/jquery.uniform.js"></script>
    <script type="text/javascript" src="/scripts/select2.min.js"></script>
    <script type="text/javascript" src="/scripts/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="/scripts/unicorn.tables.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#likjournal').addClass('open active');
        });
    </script>
}